<script setup>
import Driver from 'driver.js'
import 'driver.js/dist/driver.min.css'
import {onMounted} from 'vue'
import {useI18n} from 'vue-i18n'
import SvgIconComponent from "@/pageShows/SvgIconComponent/SvgIconComponent.vue";
import steps from './step.js'

let driver = null
onMounted(() => {
  driver = new Driver({
    // 禁止点击蒙版关闭
    allowClose: false,
    closeBtnText: '关闭',
    nextBtnText: '下一步',
    prevBtnText: '上一步'
  })

})

function onClick() {
  driver.defineSteps(steps())
  driver.start()
}

</script>
<template>
  <div>
    <div id="test" @click="onClick">

      <el-tooltip content="引导页测试">
        <el-button type="primary">开启引导页</el-button>
      </el-tooltip>
    </div>
  </div>
</template>

<style scoped>
#test {
  width: 10%;
}
</style>